<?php
/**
 * Created by PhpStorm.
 * user: songlintao
 * Date: 2017/9/4
 * Time: 下午2:07
 */

namespace app\model;


use core\lib\baseModel;

class goods extends baseModel {
	public $id;
	public $name;
	public $desc;
	public $cate_id;
	public $image;
	public $price;

	public function goodList( $page, $pageSize ) {
		$page     = intval( $page );
		$pageSize = intval( $pageSize );

		$start = ( $page - 1 ) * $pageSize + 1;
		$end   = $page * $pageSize;

		return $this->select( $this->getTableName(), '*', [ "LIMIT" => [ $start, $end ] ] );
	}
}